//package com.yupi.usercenter.once;
//
//import com.yupi.usercenter.mapper.UserMapper;
//import com.yupi.usercenter.model.domain.User;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.util.StopWatch;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//
//@Component
//public class InsertUser {
//    @Resource
//    private UserMapper userMapper;
//    /**
//     * 循环插入用户
//     * */
//    @Scheduled(initialDelay = 5000,fixedRate = Long.MAX_VALUE)
//    public void doInsertUser(){
//        StopWatch stopWatch=new StopWatch();
//        stopWatch.start();
//        final int INSERT_NUM=1000;
//        for (int i=0;i<INSERT_NUM;i++){
//            User user=new User();
//            user.setUsername("假鲨鱼");
//            user.setUserAccount("yusha");
//            user.setAvatarUrl("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F6f9e584d-f60f-4520-aec0-b6aa3a6cacf9%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1712289204&t=ee3fd87e82e9cb9c427ed0548475ae15");
//            user.setGender(2);
//            user.setUserPassword("123456");
//            user.setPhone("17596025560");
//            user.setEmail("582335836@qq.com");
//            user.setUserStatus(0);
//            user.setUserRole(0);
//            user.setPlanetCode("245");
//            user.setTags("[]");
//            userMapper.insert(user);
//        }
//        stopWatch.stop();
//        System.out.println(stopWatch.getLastTaskTimeMillis());
//    }
//}
